PROJECT(ZNetLib)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

SET(CXX_FLAGS
	-g
	#-Wall
	#-Wextra
	#-Werror
	#-Wconversion
	-march=native
	-std=c++11
)

MESSAGE(${CXX_FLAGS})

string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")


#将编译后的可执行文件放入编译目录的bin下面
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
#将编译后的库文件放到编译目录的lib下面
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

#将当前的源文件目录加入到头文件查找列表中
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})

LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lib)

#加入需要编译的子目录
ADD_SUBDIRECTORY(zlib)
ADD_SUBDIRECTORY(test)
